#include "humanManager.h"
#include "human.h"
HumanManager* HumanManager::instance = NULL;
ID_Alloc* ID_Alloc::instance = NULL;
Talking* Talking::instance = NULL;

int main(void)
{
	srand(time(NULL));

	Human *matherH = new Human(ID_Alloc::getInstance()->alloc(), "Hmother", SEX_FEMALE);
	HumanManager::getInstance()->pushHuman(matherH);
	Human *fatherH = new Human(ID_Alloc::getInstance()->alloc(), "Hfather", SEX_FEMALE);
	HumanManager::getInstance()->pushHuman(fatherH);
	HumanManager::getInstance()->marriage(matherH->getID(), fatherH->getID());
	Human *h = matherH->birth("H");

	Human *matherW = new Human(ID_Alloc::getInstance()->alloc(), "Wmother", SEX_FEMALE);
	HumanManager::getInstance()->pushHuman(matherW);
	Human *fatherW = new Human(ID_Alloc::getInstance()->alloc(), "Wfather", SEX_FEMALE);
	HumanManager::getInstance()->pushHuman(fatherW);
	HumanManager::getInstance()->marriage(matherW->getID(), fatherW->getID());
	Human *w = matherW->birth("W");

	if(h && w)
	{
		h->talk(1, w->getID());
		std::cout << std::endl;
	}

	int tmp = 0;
	std::cin >> tmp;
	return 1;
}
